package com.yatush.prepare.jsp;

import java.util.ArrayList;
import java.util.List;

import com.yatush.prepare.jsp.JspTable.ColumnHelper;
import com.yatush.prepare.jsp.JspTable.ColumnType;
import com.yatush.prepare.jsp.JspTable.TableHelper;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		JspDocument doc = new JspDocument();
		JspForm form = new JspForm("MyTodo");
		TableHelper th = new TableHelper();
		th.setListName("missions");
		List<ColumnHelper> chs = new ArrayList<JspTable.ColumnHelper>();
		th.setColumns(chs);
		chs.add(new ColumnHelper("dueDate",ColumnType.DATE,"Due date"));
		chs.add(new ColumnHelper("name",ColumnType.TEXT,"Task name"));
		chs.add(new ColumnHelper("priority",ColumnType.NUMBER,"Priority"));
		JspTable table = new JspTable(th);
		form.add(table);
		doc.addToBody(form);
		System.out.println(doc.toString());
	}

}
